package cn.victor.service.impl.homework.dubbo.web;

import cn.victor.service.HelloService;
import cn.victor.service.WangwangService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloAction {
    @Reference
    private HelloService helloService;
    @Reference
    private WangwangService wangwangService;

    @GetMapping("/hello")
    public String hello() {
        System.out.println("human:"+helloService.sayHello());
        System.out.println("dog:"+wangwangService.sayWangwang());
        return "hello";
    }
}
